package com.cdtu.outtake.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cdtu.outtake.dao.CategoryMapper;
import com.cdtu.outtake.domain.Category;
import com.cdtu.outtake.service.ICategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author : shl
 * @Date 2024/3/21 23:13
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements ICategoryService {
    @Override
    public List<Category> getCategoriesByShopId(Long shopId) {
        return getBaseMapper().selectList(new QueryWrapper<Category>().eq("shop_id", shopId));
    }
}
